<template>
	<div>
		<view class="card_back1" @click="goToPage('2', '/pages/material/index/index')"
			style="background-image: url('https://czsc.oss-cn-beijing.aliyuncs.com/mini/material.jpg');">
			<div class="card_title">
				物资出入库管理
			</div>
			<div class="card_content">
				可对物资进行入库、出库管理，实时生成库存量，对各物资做到心中有数
			</div>
		</view>
		<view class="card_back1" @click="goToPage('5', '/pages/equipment/index/index')"
			style="background-image: url('https://czsc.oss-cn-beijing.aliyuncs.com/qdimgs/equipment.png');">
			<div class="card_title">
				设备出入库管理
			</div>
			<div class="card_content">
				可对物资进行入库、出库管理，实时生成库存量，对各物资做到心中有数
			</div>
		</view>
	</div>
</template>

<script>
	import { BaseUrl } from '@/util/util.js';
	const PrefixUrl = BaseUrl();
	export default {
		data(){
			return{
				
			}
		},
		onLoad: function(option) {
			
			
		},
		created() {
			
		},
		methods:{
			goToPage(val, url) {
				if (uni.getStorageSync('userPermission').indexOf(val) >= 0) {
					//保留当前页面，跳转到应用内的某个页面，使用uni.navigateBack可以返回到原页面。
					uni.navigateTo({
						url: url
					});
				} else {
					uni.showToast({
						title: '暂无权限，请联系科信部开通权限',
						mask: true,
						icon: 'none'
					})
				}
			},
		}
	} 
</script>

<style>
	.view_title {
		color: black;
		font-size: 48rpx;
		font-weight: bold;
		text-align: center;
		margin-top: 10%;
		margin-bottom: 10%;
	}
	
	.card_back {
		width: calc(100% - 100rpx);
		background-color: burlywood;
		margin: 40rpx 20rpx;
		border-radius: 20rpx;
		text-align: center;
		padding: 30rpx;
		background-size: 100%;
	}
	
	.card_back1 {
		width: calc(100% - 100rpx);
		background-color: burlywood;
		margin: 40rpx 20rpx;
		border-radius: 20rpx;
		text-align: center;
		padding: 30rpx;
		background-size: 90%;
	}
	
	.card_back:hover {
		opacity: 0.8;
		cursor: pointer;
	}
	
	.card_title {
		padding: 40rpx;
		font-size: 48rpx;
		color: white;
	}
	
	.card_content {
		color: white;
	}
</style>